from django.db import models

# Create your models here.


class Team(models.Model):
    id = models.AutoField(primary_key=True)
    # upload_to 是图片上传的路径 help_text是上传图片的提示
    avatar = models.ImageField(
        '头像', upload_to='team', help_text='最佳尺寸：500*755')
    name = models.CharField('姓名', max_length=100)
    title = models.CharField('职务', max_length=100)
    rank = models.IntegerField('排序',help_text='排序越大越靠前')

    class Meta:
        db_table = "team"
        verbose_name = '团队管理'
        verbose_name_plural = '团队管理'

    def __str__(self):
        return self.name
